package Class.Method.Recursion;
import java.util.*;
/**
 * Enjoy programming!!!
 * Time: 2021/11/6 -  20:06
 */
public class Fibonacci {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        if (Tool.getRes(n) != -1){
        System.out.println(Tool.getRes(n));
    }
    }
}
class Tool{
    public static long getRes(int n) {
        if (1 <= n) {
            if (1 == n || 2 == n) {
                return 1;
            } else {
                return getRes(n - 1) + getRes(n - 2);
            }
        }
        else{
            System.out.println("请输入正确的数");
            return -1;
        }
    }
}